package main

import (
	"log"
	"net/http"

	"lib/utils"

	"heartbeat"
	"locate"
	"objects"
)

func main() {
	go heartbeat.ListenHeartbeat()

	http.HandleFunc(utils.ObjectPath(), objects.Handler)
	http.HandleFunc(utils.LocatePath(), locate.Handler)
	http.HandleFunc(utils.VersionPath(), versions.Handler)
	log.Fatal(http.ListenAndServe(utils.ServerAddr(), nil))
}
